package com.dit.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dit.dao.UserLoginMapper;
import com.dit.entity.UserLogin;
import com.dit.service.UserService;

@Service("userService")

public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserLoginMapper userLoginMapper;

	@Override
	public UserLogin validateUser(String username, String password) {
		return userLoginMapper.findByUsernameAndPassword(username, password);
		
		
	}

	@Override
	public int newUserSignUp(UserLogin userLogin) {
		return userLoginMapper.insert(userLogin);
	}

}
